/*
 * LDIR
 * 
 * LDIR, a GPS cartography application built for Let's Do It Romania eco 
 * campaign.
 * Copyright (C) 2010 Genera Software <office@generasoftware.com>
 * 
 * http://generasoftware.com/
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 * Place, Suite 330, Boston, MA 02111-1307 USA
 */
#include "LDIRApplication.h"
#include "LDIRDocument.h"
#ifdef EKA2
#include <eikstart.h>
#endif

#include "Logger.h"

/**
 * @brief Returns the application's UID (override from CApaApplication::AppDllUid())
 * @return UID for this application (KUidLDIRApplication)
 */
TUid CLDIRApplication::AppDllUid() const
    {
    return KUidLDIRApplication;
    }

/**
 * @brief Creates the application's document (override from CApaApplication::CreateDocumentL())
 * @return Pointer to the created document object (CLDIRDocument)
 */
CApaDocument* CLDIRApplication::CreateDocumentL()
    {
    return CLDIRDocument::NewL( *this );
    }

#ifdef EKA2

/**
 *    @brief Called by the application framework to construct the application object
 *  @return The application (CLDIRApplication)
 */    
LOCAL_C CApaApplication* NewApplication()
    {
	LOGSETTINGS(EVerbosityAll, KLogFile);
    return new CLDIRApplication;
    }

/**
* @brief This standard export is the entry point for all Series 60 applications
* @return error code
 */    
GLDEF_C TInt E32Main()
    {
    return EikStart::RunApplication( NewApplication );
    }
    
#else     // Series 60 2.x main DLL program code

/**
* @brief This standard export constructs the application object.
* @return The application (CLDIRApplication)
*/
EXPORT_C CApaApplication* NewApplication()
    {
	LOGSETTINGS(EVerbosityAll, KLogFile);
    return new CLDIRApplication;
    }

/**
* @brief This standard export is the entry point for all Series 60 applications
* @return error code
*/
GLDEF_C TInt E32Dll(TDllReason /*reason*/)
    {
    return KErrNone;
    }

#endif // EKA2
